import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import http from './lib/http'
import config from './lib/config'

import './assets/css/normalize.less'
import './assets/css/global.less'

import {
  Dialog,
  Input,
  InputNumber,
  Radio,
  RadioGroup,
  RadioButton,
  Checkbox,
  CheckboxButton,
  CheckboxGroup,
  Carousel,
  CarouselItem,
  Switch,
  Select,
  Slider,
  Option,
  OptionGroup,
  Button,
  ButtonGroup,
  Icon,
  Loading,
  Link,
  MessageBox,
  Message,
  Notification
} from 'element-ui';

Vue.prototype.$ELEMENT = { size: 'small', zIndex: 3000 };

Vue.use(Dialog);
Vue.use(Input);
Vue.use(InputNumber);
Vue.use(Radio);
Vue.use(RadioGroup);
Vue.use(RadioButton);
Vue.use(Checkbox);
Vue.use(CheckboxButton);
Vue.use(CheckboxGroup);
Vue.use(Carousel);
Vue.use(CarouselItem);
Vue.use(Switch);
Vue.use(Select);
Vue.use(Slider);
Vue.use(Option);
Vue.use(OptionGroup);
Vue.use(Button);
Vue.use(ButtonGroup);
Vue.use(Icon);
Vue.use(Link);

Vue.use(Loading.directive);

Vue.prototype.$loading = Loading.service;
Vue.prototype.$msgbox = MessageBox;
Vue.prototype.$alert = MessageBox.alert;
Vue.prototype.$confirm = MessageBox.confirm;
Vue.prototype.$prompt = MessageBox.prompt;
Vue.prototype.$notify = Notification;
Vue.prototype.$message = Message;

Vue.config.productionTip = false
Vue.prototype.$http = http;
Vue.prototype.$baseUrl = config.baseUrl

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
